package com.xxx4biji.date.novel;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * @author ls
 * @version 1.0
 * 年月日时分秒
 * 1)LocalDateTime
 * 年月日
 * 2)LocalDate
 * 时分秒
 * 3)LocalTime
 */
public class Demo01 {
    public static void main(String[] args) {
        LocalDateTime date = LocalDateTime.now();
        //年
        System.out.println(date.getYear());
        //月
        System.out.println(date.getMonthValue());
        //日
        System.out.println(date.getDayOfMonth());
        //时
        System.out.println(date.getHour());
        //分
        System.out.println(date.getMinute());
        //秒
        System.out.println(date.getSecond());

    }
}
